#include<cstdio>
#include<vector>
#include<cstdlib>
#include<iostream>
using namespace std;
const int b = 10000;
int tem[b];
void mer_sort(int* a, int l, int r)
{
    if (l >= r)
    {
        return;
    }
    int mid = (l + r) >> 1;
    mer_sort(a, l, mid);
    mer_sort(a, mid + 1, r);
    int i = l;
    int j = mid + 1;
    int k = 0;
    while (i <= mid && j <= r)
    {
        if (a[i] > a[j])
        {
            tem[k++] = a[j++];
        }
        else
        {
            tem[k++] = a[i++];
        }
    }
    while (i <= mid)
    {
        tem[k++] = a[i++];
    }
    while (j <= r)
    {
        tem[k++] = a[j++];
    }
    for (i = l, j = 0; i <= r; i++, j++)
    {
        a[i] = tem[j];
    }
}
int main()
{
    int n = 0;
    cin >> n;
    int* p = (int*)malloc(sizeof(int) * n);
    int i = 0;
    for (i = 0; i < n; i++)
    {
        scanf_s("%d", &p[i]);
    }
    mer_sort(p, 0, n - 1);
    for (i = 0; i < n; i++)
    {
        cout << p[i] << ' ';
    }
    return 0;
}